# $Id: PKGBUILD 87419 2013-03-31 19:18:23Z stephane $
# Maintainer: Lukas Jirkovsky <l.jirkovsky@gmail.com>
pkgname=luxrays
pkgver=1.2
_pkgver=475fbf15f0ca
pkgrel=2
pkgdesc="Accelerate the ray intersection process by using GPUs"
arch=('i686' 'x86_64')
url="http://www.luxrender.net/"
license=('GPL')
depends=('freeimage' 'libcl' 'libgl')
optdepends=('glew: demos (SmallLuxGPU etc.)' 'freeglut: demos (SmallLuxGPU etc.)'
            'boost-libs: demos (SmallLuxGPU etc.)')
makedepends=('cmake' 'boost' 'mesa' 'opencl-headers' 'glew' 'freeglut')
source=(https://bitbucket.org/luxrender/luxrays/get/$_pkgver.tar.bz2)
md5sums=('ac98e9a42ecc20d97d4c12dcdf17e315')

build() {
  cd "$srcdir/luxrender-$pkgname-$_pkgver"

  export CXXFLAGS="$CXXFLAGS -lpthread"
  cmake -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_SKIP_RPATH=ON \
    -DLUXRAYS_DISABLE_OPENCL=OFF \
    .
  make
}

package() {
  cd "$srcdir/luxrender-$pkgname-$_pkgver"

  install -d -m755 "$pkgdir"/usr/{bin,include,lib}
  install -m755 bin/* "$pkgdir"/usr/bin
  install -m644 lib/* "$pkgdir"/usr/lib
  cp -a include/luxrays "$pkgdir"/usr/include
}

# vim:set ts=2 sw=2 et:
